1. Field of the Invention
The present invention relates to a semiconductor memory and, more particularly, to a semiconductor disk device and a flash ATA (AT attachment) card which employ, for example, flash memories.
2. Description of the Background Art
Traditionally, a semiconductor disk device, a flash ATA card and the like have been proposed as external memories for computers, and comprise bulk flash memories for storing data therein and a controller for controlling the bulk flash memories.
The controller includes a CPU (central processing unit) and a firmware memory for storing programs known as firmware. The use of a ROM (read-only memory) as the firmware memory is disadvantageous in that firmware is not readily modified since every modification and every version update of the firmware require the ROM to be remade. A technique which uses a RAM (random access memory) as the firmware memory has hence been proposed such that firmware previously stored in part of flash memories is loaded to the RAM at power-on and a program loaded to the RAM is executed.
FIG. 4 conceptually illustrates a relationship between a RAM map and a flash memory map when the above described technique is employed. The firmware stored in the flash memories as illustrated in the flash memory map is loaded to the RAM as illustrated in the RAM map when power is turned on. Such a method is advantageous in that modification and version update of the firmware are readily carried out by rewriting the firmware to be stored in the flash memories.
However, the use of the above described method requires the preparation of a RAM capacity of a size large enough to store the firmware. If a program size increases because of the modification of the firmware or the addition of a function to the firmware to exceed the prepared capacity of the RAM, it is impossible to equip the external memory with the modified firmware. On the other hand, there is a demand for minimizing the RAM size which influences costs.
A technique of selectively loading a plurality of program codes is disclosed in, for example, Japanese Patent Application Laid-Open No. P01-121933A (1989).
According to a first aspect of the present invention, a semiconductor memory comprises: a nonvolatile semiconductor storage section having a plurality of rewritable, individually accessible blocks for individually storing therein a plurality of program codes each corresponding to one process, respectively; a RAM including a first storage region for mutually exclusively storing the plurality of program codes therein; and an error correcting section connected between the RAM and the nonvolatile semiconductor storage section and for transferring one of the plurality of program codes to the RAM while performing error correction upon the one of the plurality of program codes.
Preferably, according to a second aspect of the present invention, in the semiconductor memory of the first aspect, the RAM further includes a second storage region for storing therein a starting address of each of the plurality of blocks.
Preferably, according to a third aspect of the present invention, in the semiconductor memory of the first or second aspect, each of the plurality of program codes is associated with a command provided from an outside of the semiconductor memory.
The semiconductor memory according to the first aspect of the present invention is designed such that the modification of firmware or the addition of a function of the firmware require only the modification of the nonvolatile semiconductor storage section, eliminating the need to remake the ROM. Additionally, the semiconductor memory of the first aspect is high in expandability since the increase in the size of a program provided by the modification of the firmware or the addition of a function of the firmware does not require the increase in the capacity of the first storage region of the RAM, and is low in costs because of the provision of a greater number of functions with a smaller RAM capacity. Furthermore, the error correction is performed on the program being transferred from the nonvolatile semiconductor storage section to the RAM, to preclude a program in which an uncorrectable error occurs from being loaded to the RAM.
In the semiconductor memory according to the second aspect of the present invention, the starting addresses of the respective blocks are stored in the second storage region before the program codes are loaded. This eliminates the need to access the nonvolatile semiconductor storage section each time one of the program codes is stored in the first storage region, achieving rapid operation.
The semiconductor memory according to the third aspect of the present invention can easily add a function without remaking the ROM and increasing the size of the RAM capacity if there is a need to support a new command because of a review of specifications or the addition of an option.
It is therefore an object of the present invention to provide an external memory including a RAM of a fixed size serving as a memory for storing firmware and capable of being equipped with firmware of a size exceeding the fixed size of the RAM, thereby to provide a system which is low in costs and easy in modification of multifunctional firmware.
These and other objects, features, aspects and advantages of the present invention will become more apparent from the following detailed description of the present invention when taken in conjunction with the accompanying drawings.